package com.gosophia.reportData.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.OrderCondition;
import com.gosophia.commons.Page;
import com.gosophia.commons.PropertyFilter;
import com.gosophia.reportData.ws.ReportDataSearchWebService;
import com.gosophia.taskManagement.dto.MissionDTO;
import com.opensymphony.xwork2.ActionSupport;

@Controller("listReportDataAction")
@Scope("prototype")
public class ListReportDataAction extends ActionSupport {

    private String searchType;

    private List<PropertyFilter> propertyFilters;

    private List<OrderCondition> orderConditions;

    private OrderCondition orderCondition;

    private String searchCond;

    @Autowired
    private ReportDataSearchWebService reportDataSearchWebService;

    private Page<MissionDTO> page;

    private int pageNo = 1;

    private int pageSize = 10;

    @Override
    public String execute() throws Exception {
        // page = reportDataSearchWebService.findReportDataByPage(searchCond,
        // pageNo, pageSize, propertyFilters, orderConditions);
        return SUCCESS;
    }

    public String getSearchType() {
        return searchType;
    }

    public void setSearchType(String searchType) {
        this.searchType = searchType;
    }

    public List<PropertyFilter> getPropertyFilters() {
        return propertyFilters;
    }

    public void setPropertyFilters(List<PropertyFilter> propertyFilters) {
        this.propertyFilters = propertyFilters;
    }

    public List<OrderCondition> getOrderConditions() {
        return orderConditions;
    }

    public void setOrderConditions(List<OrderCondition> orderConditions) {
        this.orderConditions = orderConditions;
    }

    public OrderCondition getOrderCondition() {
        return orderCondition;
    }

    public void setOrderCondition(OrderCondition orderCondition) {
        this.orderCondition = orderCondition;
    }

    public String getSearchCond() {
        return searchCond;
    }

    public void setSearchCond(String searchCond) {
        this.searchCond = searchCond;
    }

    public ReportDataSearchWebService getReportDataSearchWebService() {
        return reportDataSearchWebService;
    }

    public void setReportDataSearchWebService(
            ReportDataSearchWebService reportDataSearchWebService) {
        this.reportDataSearchWebService = reportDataSearchWebService;
    }

    public Page<MissionDTO> getPage() {
        return page;
    }

    public void setPage(Page<MissionDTO> page) {
        this.page = page;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}
